//
//  DKMeViewController.m
//  BS1
//
//  Created by 丁侃 on 16/4/23.
//  Copyright © 2016年 丁侃. All rights reserved.
//

#import "DKMeViewController.h"
#import "DKText.h"

@interface DKMeViewController ()


@end

@implementation DKMeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = DKRandomColor;
    
    //将设置导航栏内容抽取
    [self setupNavContent];

}


//将设置导航栏内容抽取
-(void)setupNavContent
{
    //添加左按钮
    UIBarButtonItem *setBarButtom = [UIBarButtonItem dk_itemWithTarget:self ation:@selector(setClick) ImageNameNormal:@"mine-setting-icon" imageNameHighlighted:@"mine-setting-icon-click"];
    
    UIBarButtonItem *moomBarButtom = [UIBarButtonItem dk_itemWithTarget:self ation:@selector(moomClick:) ImageNameNormal:@"mine-moon-icon" imageNameSelected:@"mine-moon-icon-click"];
    
    
    self.navigationItem.rightBarButtonItems = @[setBarButtom, moomBarButtom];
}




-(void)moomClick:(UIButton *)btn
{
    btn.selected = !btn.selected;
    
    DKFunc
}

-(void)setClick
{
    DKText *text1 = [[DKText alloc]init];
    text1.view.backgroundColor = DKRandomColor;
    
    [self.navigationController pushViewController:text1 animated:YES];
}



@end
